@using InvoiceProject.Enums
@using InvoiceProject.Helpers
@using System.Web.Mvc.Html;

@model InvoiceProject.Models.Business
@* This partial view defines form fields that will appear when creating and editing entities *@
@*    @Html.HiddenFor(model => model.DateModified)
    @Html.HiddenFor(model => model.UserModified)
    @Html.HiddenFor(model => model.Address.DateModified)
    @Html.HiddenFor(model => model.Address.UserModified)*@
@Html.HiddenFor(model =>model.UserName)
<li data-role="fieldcontain">
    @Html.LabelFor(model => model.Name)
    @Html.TextBoxFor(model => model.Name)
    @Html.ValidationMessageFor(model => model.Name, "Business Name is required.")
</li>
<li data-role="fieldcontain">
    @Html.LabelFor(model => model.Phone)
    @Html.TextBoxFor(model => model.Phone)
    @Html.ValidationMessageFor(model => model.Phone, "Business Phone is required.")
</li>
<li data-role="fieldcontain">
    @Html.LabelFor(model => model.ABN)
    @Html.TextBoxFor(model => model.ABN)
    @Html.ValidationMessageFor(model => model.ABN, "Business ABN is required.")
</li>
<li data-role="fieldcontain">
    @Html.LabelFor(model => model.Email)
    @Html.TextBoxFor(model => model.Email)
    @Html.ValidationMessageFor(model => model.Email, "Business Email is required.")
</li>
<li data-role="list-divider">Business Address</li>
<li data-role="fieldcontain">
    @Html.LabelFor(model => model.Address.AddressLine1)
    @Html.TextBoxFor(model => model.Address.AddressLine1)
    @Html.ValidationMessageFor(model => model.Address.AddressLine1, "Address Line 1 is required.")
</li>
<li data-role="fieldcontain">
    @Html.LabelFor(model => model.Address.AddressLine2)
    @Html.TextBoxFor(model => model.Address.AddressLine2)
    @Html.ValidationMessageFor(model => model.Address.AddressLine2)
</li>
<li data-role="fieldcontain">
    @Html.LabelFor(model => model.Address.Suburb)
    @Html.TextBoxFor(model => model.Address.Suburb)
    @Html.ValidationMessageFor(model => model.Address.Suburb, "Suburb is required.")
</li>
<li data-role="fieldcontain">
    @Html.LabelFor(model => model.Address.PostCode)
    @Html.TextBoxFor(model => model.Address.PostCode)
    @Html.ValidationMessageFor(model => model.Address.PostCode)
  
</li>
<li data-role="fieldcontain">
    @Html.LabelFor(model => model.Address.State)
    @Html.TextBoxFor(model => model.Address.State)
    @Html.ValidationMessageFor(model => model.Address.State, "State is required.")
</li>
<li data-role="fieldcontain" id="fieldcontain">
    @Html.LabelFor(model => model.LookupTaxCountry.Country, new { @class = "ui-input-text" })
   @Model.LookupTaxCountry.ToCountryModelSelectList(Model.LookupTaxCountry.Country.ToString())
 @Html.ValidationMessageFor(model => model.LookupTaxCountry.Country, "Tax Country is required.")
</li>
<li data-role="fieldcontain">
    @Html.LabelFor(model => model.AccountType, new { @class = "ui-input-text" })
 @Model.LookupTaxCountry.ToAccountSelectList(Model.AccountType.ToString())
    @Html.ValidationMessageFor(model => model.AccountType, "Account is required.")
</li>
